#!/bin/bash 
who |grep -v "^root" |awk '{print $1,$2}' >file1
while read user tty
do
	echo "$user :Hi,I'm root!" >/dev/$tty
done <file1

